/*
 * StringStream.h
 *
 *  Created on: 2012. 10. 28.
 *      Author: dalxx
 */

#ifndef STRINGSTREAM_H_
#define STRINGSTREAM_H_
#include <Stream.h>
class StringStream :public Stream {
protected:
	char* buffer;
	size_t size;
	unsigned int index;
public:

	StringStream(char* _buffer, size_t buffer_size);
	StringStream();
	virtual ~StringStream();
	virtual int available();
	virtual int read();
	virtual int peek();
	virtual size_t write(uint8_t byte);
	virtual void flush();
	size_t bufferSize();
	int seek(int pos);
	void resetBuffer(char* _buffer, size_t buffer_size);

};

#endif /* STRINGSTREAM_H_ */
